package com.develop.data.loan.repository;

import com.develop.data.loan.model.LoanContract;
import com.develop.data.loan.model.LoanRepayment;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.stereotype.Repository;

import java.util.List;

@RepositoryRestResource(path="loanRepayment")
public interface LoanRepaymentRepository extends JpaRepository<LoanRepayment, String> {
    List<LoanRepayment> findAllByLoanContract(LoanContract loanContract);
}
